#include "Document.h"
#include "DocStats.h"
#include "DocElement.h"
#include "Paragraph.h"
#include "RasterBitmap.h"

Document::Document()
{
	m_elements.push_back(boost::shared_ptr<DocElement>(new Paragraph) );
	m_elements.push_back(boost::shared_ptr<DocElement>(new RasterBitmap) );

}
void Document::DisplayStatistics()
{
	DocStats statistics;
	for(ElementContainer::iterator iter=m_elements.begin();iter!=m_elements.end();++iter) {
		(*iter)->Accept(statistics);
	}
	statistics.Display();
}